-- CALC_LAMP_SUMMON_PARA

-----------------------------------------------
--  计算灯神属性
-- @param  classId       灯神id（summon表）
-- @param  pos           格子位置
return function(classId, pos)
    local dungeonId = DungeonM.getDungeonId();
    local layerFix  = DungeonAreaM.query(dungeonId, "layer_fix");
    local layer     = DungeonM.currentLayer();
    if layer > 80 then
        layer = math.modf(layer * 0.85 + 12)
    end

    -- 需要策划去算
    local lampSummon = ME.user.dbase:query("lamp_summon", {});

    -- 位置
    local para = {["pos"] = pos, };

    local hp_coef = 16 + (lampSummon["hp_coef"] or 0);
    local attack_coef = 7 + (lampSummon["attack_coef"] or 0);

    para["hp"] = FormulaM.invoke("CALC_DUNGEON_MONSTER_INIT_HP", hp_coef, layer, layerFix);
    para["attack"] = FormulaM.invoke("CALC_DUNGEON_MONSTER_INIT_ATTACK", attack_coef, layer, layerFix);

    -- 神灯巨人属性增强
    local prop = PropM.combine(ME.user, "attrib_lamp", "attack");
    para["attack"] = PropM.apply(prop, para["attack"]);

    prop = PropM.combine(ME.user, "attrib_lamp", "max_hp");
    para["hp"] = PropM.apply(prop, para["hp"]);

    return para;
end
